package com.ethink.warehouse.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ethink.warehouse.api.request.LogisticsTraceDetailOrderListRequest;
import com.ethink.warehouse.api.response.LogisticsTraceDetailOrderGetDetailResponse;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.LogisticsTraceDetailOrderInfo;
import com.ethink.warehouse.api.request.LogisticsTraceDetailOrderQueryRequest;
import com.ethink.warehouse.common.entity.LogisticsTraceDetailOrder;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * 入库/出库单 Mapper接口
 *
 * @author default
 * @date 2022-11-10
 */
@Mapper
public interface LogisticsTraceDetailOrderMapper extends BaseMapper<LogisticsTraceDetailOrder> {

    /**
     * 分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<LogisticsTraceDetailOrderInfo> queryLogisticsTraceDetailOrder(Page buildPage, @Param("request") LogisticsTraceDetailOrderQueryRequest request);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    LogisticsTraceDetailOrderInfo getLogisticsTraceDetailOrderById(@Param("id") Long id);

    /**
     * 列表查询
     *
     * @param request
     * @return
     */
    List<LogisticsTraceDetailOrderInfo> listLogisticsTraceDetailOrder(@Param("request") LogisticsTraceDetailOrderListRequest request);

    /**
     * 根据物流跟进单号查询
     * @param traceOrderNo
     * @param orderType
     * @return
     */
    List<LogisticsTraceDetailOrderGetDetailResponse> listLogisticsTraceDetailOrderByTraceOrderNo(@Param("traceOrderNo") String traceOrderNo, @Param("orderType") Integer orderType);

}